<template>
    <quill-editor
        v-model="option.form[option.model]"
        ref="myQuillEditor"
        :options="editorOption"
        @focus="onEditorFocus($event)"
        @blur="onEditorBlur($event)"
        @change="onEditorChange($event)"
        class="quill-editor-wrap"
    ></quill-editor>
</template>
<script>
import { quillEditor } from "vue-quill-editor"; //调用编辑器
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
export default {
    props:{
        option:Object
    },
    data(){
        return{
            editorOption: {},
        }
    },
    methods:{
        //******************* */Editor事件 /******************** *//
        onEditorReady(editor) {}, // 准备编辑器
        onEditorBlur() {}, // 失去焦点事件
        onEditorFocus() {}, // 获得焦点事件
        onEditorChange() {}, // 内容改变事件
        //******************* */Editor结束 /******************** *//
    },
    components: {
        quillEditor
    }
}
</script>
<style lang="stylus">
.quill-editor-wrap {
    .ql-container, .ql-editor {
        height: 200px;
    }
}
</style>